Skip to content

feat(tracing): Move common tracing code to core #7166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Feb 13, 2023

Closes #7091

This PR:

  • Moves the common tracing code to core/src/tracing
    • @sentry/core now exports the same common types plus:
      • addTracingExtensions - Required so that @sentry/tracing can still add the extensions via addExtensionMethods
      • TRACING_DEFAULTS - This contains the timing defaults that are used across tracing
  • Leaves addExtensionMethods in @sentry/tracing due to _autoloadDatabaseIntegrations
  • Leaves the tests in @sentry/tracing to ensure there are no breaking changes to public API
    • idletransaction.test.ts imports code from core so IdleTransactionSpanRecorder doesn't need to be made public
  • I had to make some changes to the tests where Jest mocks were getting hoisted

This PR does not:

  • Change any of the downstream SDKs to import Span, Transaction, etc from @sentry/core rather than @sentry/tracing

@timfish
Copy link
Collaborator Author

timfish commented Feb 13, 2023

Well at least the integration tests are doing their job...

@timfish timfish force-pushed the feat/tracing-in-core branch from 153e898 to 43d5df0 Compare February 13, 2023 22:24
@timfish timfish marked this pull request as ready for review February 19, 2023 12:44
@AbhiPrasad
Copy link
Member

Gonna take this over to try and merge!

@AbhiPrasad
Copy link
Member

Closing this PR in favour of #7339 (same thing, but with merge conflicts fixed. Had to open a new PR since I couldn't push to fork).

@AbhiPrasad AbhiPrasad closed this Mar 6, 2023
@timfish timfish deleted the feat/tracing-in-core branch March 14, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move common @sentry/tracing code to @sentry/core
2 participants